<?php
/**
 * Created by PhpStorm.
 * User: 共赢岛
 * Date: 2023/12/7
 * Time: 17:12
 */

namespace App\Http\Resources;

use App\Admin\Services\CarService;
use App\Models\Brand;
use App\Services\LifeCycle\PackageService;
use Illuminate\Http\Resources\Json\JsonResource;
use Illuminate\Database\Eloquent\Collection;

class PackageResource extends JsonResource
{
    public function toArray($request)
    {
        return [
            'package_id' => "{$this->id}",
            'package_title' => $this->title,
            'pic' => path2url($this->pic),
            'attrs' => json_decode($this->attrs, true),
        ];
    }
}